#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:MrG
import json
import time
import traceback

from django.conf import settings
from django.http import JsonResponse
from django.views.generic.base import View
import logging

logger = logging.getLogger(__name__)


class ReceiveRequire(View):
    def post(self, request):
        body = json.loads(request.body)
        # body = request.body
        print(body)
        return JsonResponse({'msg': 'ok'})

    def get(self, request):
        self.post(request)
